package com.bungarus.group.service;

import com.bungarus.group.model.Group;
import com.bungarus.group.model.Member;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
 * Created by tang on 2018/12/13.
 */
public interface MemberService {
    String UNKNOWN = "UNKNOWN";
    int DEFAULT_START_PAGE = 0;
    int DEFAULT_PAGE_SIZE = 20;
    String DEFAULT_SORT_BY_GROUP = "gid";


    Member isExists(String account, String pwd, long tid);

    Member isExists(Member member);

    Member createMember(long id, long tenantId, String account, String password);

    Member createMember(long id, long tenantId, String name, String account, String password);

    Member createMember(Member member);

    void deleteMember(String acccount, long tenantId);

    void deleteMember(Member member);

    List<Group> retrieveGroupsMemberBelongsTo(long mid, long tid);

    List<Group> retrieveGroupsMemberBelongsTo(long mid, long tid, Pageable page);

    List<Group> retrieveGroupsMemberBelongsTo(Member member);

    List<Group> retrieveGroupsMemberBelongsTo(Member member, Pageable page);

    int totalCountOfGroupsMemberBelongsTo(long mid, long tid);
}
